我需要在 Delphi XE 中访问此 Delphi Prism 类库中的方法“Auth”:
namespace ClassLibrary1;
interface
uses
System,
System.IO,
System.Security.Cryptography,
System.Runtime.InteropServices,
System.Text;
type
ConsoleApp = public class
private
class method hashMe(input: string): string;
class method Encrypt(clearText: string; Password: string; Salt: array of byte; iteration: Integer): string;
class method Encrypt(clearData: array of byte; Key: array of byte; IV: array of byte): array of byte;
class method Encrypt(clearData: array of byte; Password: string; Salt: array of byte; iteration: integer): array of byte;
class method Decrypt(cipherText: string; Password: string; Salt: array of byte; iterations: Integer): string;
class method Decrypt(cipherData: array of byte; Password: string; Salt: array of byte; iterations: integer): array of byte;
class method Decrypt(cipherData: array of byte; Key: array of byte; IV: array of byte): array of byte;
protected
public
[UnmanagedExport('Auth')]
class method Auth(userName: String; userPassword: String): String;
end;
implementation
[...]
使用 CrossTalk 很容易,但 CrossTalk 非常昂贵,并且此代码用于宠物项目。有什么简单的方法可以做到这一点?
TIA