Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 14, 2013
@namelessjon namelessjon Restore NONCEBYTES constant
Though it still isn't documented, in the hope people use the helpful
methods provided.
2d16346
@namelessjon namelessjon Remove last traces of ill-fated Ciphertext class
Now it lives only in the history
8c025d1
View
2  lib/rbnacl/box.rb
@@ -117,7 +117,7 @@ def nonce_bytes
#
# @raise [Crypto::LengthError] If the nonce is not valid
#
- # @return [Crypto::Ciphertext] The ciphertext without the nonce prepended (BINARY encoded)
+ # @return [String] The ciphertext without the nonce prepended (BINARY encoded)
def box(nonce, message)
@primitive.box(nonce, message)
end
View
2  lib/rbnacl/box/curve25519_xsalsa20_poly1305.rb
@@ -94,7 +94,7 @@ def nonce_bytes
#
# @raise [Crypto::LengthError] If the nonce is not valid
#
- # @return [Crypto::Ciphertext] The ciphertext without the nonce prepended (BINARY encoded)
+ # @return [String] The ciphertext without the nonce prepended (BINARY encoded)
def box(nonce, message)
Util.check_length(nonce, NONCEBYTES, "Nonce")
msg = Util.prepend_zeros(NaCl::ZEROBYTES, message)
View
1  lib/rbnacl/nacl.rb
@@ -47,6 +47,7 @@ def self.#{name}(*args)
[:pointer, :pointer]
CURVE25519_XSALSA20_POLY1305_BOX_NONCEBYTES = 24
+ NONCEBYTES = CURVE25519_XSALSA20_POLY1305_BOX_NONCEBYTES
ZEROBYTES = 32
BOXZEROBYTES = 16
CURVE25519_XSALSA20_POLY1305_BOX_BEFORENMBYTES = 32
View
2  lib/rbnacl/secret_box.rb
@@ -70,7 +70,7 @@ def nonce_bytes
#
# @raise [Crypto::LengthError] If the nonce is not valid
#
- # @return [Crypto::Ciphertext] The ciphertext without the nonce prepended (BINARY encoded)
+ # @return [String] The ciphertext without the nonce prepended (BINARY encoded)
def box(nonce, message)
@primitive.box(nonce, message)
end
View
2  lib/rbnacl/secret_box/xsalsa20_poly1305.rb
@@ -82,7 +82,7 @@ def nonce_bytes
#
# @raise [Crypto::LengthError] If the nonce is not valid
#
- # @return [Crypto::Ciphertext] The ciphertext without the nonce prepended (BINARY encoded)
+ # @return [String] The ciphertext without the nonce prepended (BINARY encoded)
def box(nonce, message)
Util.check_length(nonce, NONCEBYTES, "Nonce")
msg = Util.prepend_zeros(NaCl::ZEROBYTES, message)

No commit comments for this range

Something went wrong with that request. Please try again.