INNER CODE UNIT · Swift

message

jedisct1/swift-sodium · Sources/Sodium/Box.swift:377

        var message = Bytes(count: anonymousCipherText.count - SealBytes)

        guard crypto_box_seal_open(
            &message,
            anonymousCipherText, UInt64(anonymousCipherText.count),
            recipientPublicKey,
            recipientSecretKey
        ).exitCode == .SUCCESS else { return nil }

        return message
    }
}

public extension Box {
    /**
     Computes a shared secret key given a public key and a secret key.

     Applications that send several messages to the same receiver or receive several messages from the same

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…