You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: verify_key.rb
    path of file: ./repos/rbnacl/lib/rbnacl/signatures/ed25519
    
    the code of the file until where you have to start completion: # encoding: binary
# frozen_string_literal: true

module RbNaCl
  module Signatures
    module Ed25519
      # The public key counterpart to an Ed25519 SigningKey for producing digital
      # signatures. Like the name says, VerifyKeys can be used to verify that a
      # given digital signature is authentic.
      #
      # For more information on the Ed25519 digital signature system, please see
      # the SigningKey documentation.
      class VerifyKey
        include KeyComparator

    
        def verify_attached(signed_message)
          raise LengthError, "Signed message can not be nil" if signed_message.nil?
          raise LengthError, "Signed message can not be shorter than a signature" if signed_message.bytesize <= signature_bytes

          buffer = Util.zeros(signed_message.bytesize)
          buffer_len = Util.zeros(FFI::Type::LONG_LONG.size)

          success = self.class.sign_ed25519_open(buffer, buffer_len, signed_message, signed_message.bytesize, @key)
          raise(BadSignatureError, "signature was forged/corrupt") unless success

          true
        end