msiglobal.pm (cdf0e10c) | msiglobal.pm (19d58b3a) |
---|---|
1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 1513 unchanged lines hidden (view full) --- 1522 # my $id = pack("A32", $digest); 1523 my ($first, $second, $third, $fourth, $fifth) = unpack ('A8 A4 A4 A4 A12', $digest); 1524 $guid = "$first-$second-$third-$fourth-$fifth"; 1525 1526 return $guid; 1527} 1528 1529################################################################# | 1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 1513 unchanged lines hidden (view full) --- 1522 # my $id = pack("A32", $digest); 1523 my ($first, $second, $third, $fourth, $fifth) = unpack ('A8 A4 A4 A4 A12', $digest); 1524 $guid = "$first-$second-$third-$fourth-$fifth"; 1525 1526 return $guid; 1527} 1528 1529################################################################# |
1530# Calculating a ID with a string using md5 (very fast). 1531################################################################# 1532 1533sub calculate_id 1534{ 1535 my ( $string, $length ) = @_; 1536 1537 my $id = ""; 1538 1539 my $md5 = Digest::MD5->new; 1540 $md5->add($string); 1541 my $digest = lc($md5->hexdigest); 1542 $id = substr($digest, 0, $length); 1543 1544 return $id; 1545} 1546 1547################################################################# |
|
1530# Filling the component hash with the values of the 1531# component file. 1532################################################################# 1533 1534sub fill_component_hash 1535{ 1536 my ($componentfile) = @_; 1537 --- 830 unchanged lines hidden --- | 1548# Filling the component hash with the values of the 1549# component file. 1550################################################################# 1551 1552sub fill_component_hash 1553{ 1554 my ($componentfile) = @_; 1555 --- 830 unchanged lines hidden --- |