1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Security.idl.
use strict;
package Raritan::RPC::security::PasswordSettings;
sub encode {
my ($in) = @_;
my $encoded = {};
$encoded->{'enableAging'} = ($in->{'enableAging'}) ? JSON::true : JSON::false;
$encoded->{'agingInterval'} = 1 * $in->{'agingInterval'};
$encoded->{'enableStrongReq'} = ($in->{'enableStrongReq'}) ? JSON::true : JSON::false;
$encoded->{'minPwLength'} = 1 * $in->{'minPwLength'};
$encoded->{'maxPwLength'} = 1 * $in->{'maxPwLength'};
$encoded->{'enforceLower'} = ($in->{'enforceLower'}) ? JSON::true : JSON::false;
$encoded->{'enforceUpper'} = ($in->{'enforceUpper'}) ? JSON::true : JSON::false;
$encoded->{'enforceNumeric'} = ($in->{'enforceNumeric'}) ? JSON::true : JSON::false;
$encoded->{'enforceSpecial'} = ($in->{'enforceSpecial'}) ? JSON::true : JSON::false;
$encoded->{'pwHistoryDepth'} = 1 * $in->{'pwHistoryDepth'};
return $encoded;
}
sub decode {
my ($agent, $in) = @_;
my $decoded = {};
$decoded->{'enableAging'} = ($in->{'enableAging'}) ? 1 : 0;
$decoded->{'agingInterval'} = $in->{'agingInterval'};
$decoded->{'enableStrongReq'} = ($in->{'enableStrongReq'}) ? 1 : 0;
$decoded->{'minPwLength'} = $in->{'minPwLength'};
$decoded->{'maxPwLength'} = $in->{'maxPwLength'};
$decoded->{'enforceLower'} = ($in->{'enforceLower'}) ? 1 : 0;
$decoded->{'enforceUpper'} = ($in->{'enforceUpper'}) ? 1 : 0;
$decoded->{'enforceNumeric'} = ($in->{'enforceNumeric'}) ? 1 : 0;
$decoded->{'enforceSpecial'} = ($in->{'enforceSpecial'}) ? 1 : 0;
$decoded->{'pwHistoryDepth'} = $in->{'pwHistoryDepth'};
return $decoded;
}
1;
|