lib/rbnacl/group_elements/curve25519.rb in rbnacl-5.0.0 vs lib/rbnacl/group_elements/curve25519.rb in rbnacl-6.0.0

- old
+ new

@@ -29,11 +29,11 @@ sodium_type :scalarmult sodium_primitive :curve25519 sodium_function :scalarmult_curve25519, :crypto_scalarmult_curve25519, - [:pointer, :pointer, :pointer] + %i[pointer pointer pointer] # Number of bytes in a scalar on this curve SCALARBYTES = 32 BYTES = 32 @@ -66,9 +66,10 @@ Util.check_length(integer, SCALARBYTES, "integer") result = Util.zeros(SCALARBYTES) raise CryptoError, "degenerate key detected" unless self.class.scalarmult_curve25519(result, integer, @point) + self.class.new(result) end # Return the point serialized as bytes #